extension ExtensionList on List {
  // 数组转字符串
  String listToString({Pattern pattern = ','}) {
    if (length == 0) {
      return '';
    }
    String result = "";
    forEach((value) =>
        {if (result == "") result = value.toString() else result = result + pattern.toString() + value.toString()});
    return result.toString();
  }

  bool isEqual(List? list) {
    if (list == null) {
      return false;
    }
    if (length != list.length) {
      return false;
    }

    for (int i = 0; i < length; i++) {
      if (this[i] != list[i]) {
        return false;
      }
    }
    return true;
  }
}
